<?php
namespace Common\Model;
use Think\Model\RelationModel;
class BannersModel extends RelationModel{

    protected $_link = array(
        'imglist'=>array(
            'mapping_type'=>self::HAS_MANY,
            'class_name'  =>'BannerImgs',
            'foreign_key'=>'pid',
            'condition'=>'status=1',
            'mapping_order'=>'listorder asc'
        )
    );
}